<%@ page import="com.Bean.User" %>
<%@ page import="com.Util.DB" %>
<%@ page import="com.Util.UserDao" %>
<%--
  Created by IntelliJ IDEA.
  User: SZB
  Date: 2019/6/25
  Time: 13:35
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %><%
    boolean istest = DB.jsptest;

    String tkid=new String();
    String username=new String();
    User user=new User();
    if(istest)
    {
        username=request.getParameter("u");

    }else if (session.getAttribute("username") == null) {

        response.sendRedirect("../login.jsp");
        //request.getRequestDispatcher("../login.jsp").forward(request, response);
    }else{
        username=session.getAttribute("username").toString();
    }
    user= UserDao.selectUser(username);

%>
<html>
<head>
    <title>咨询信息</title>
    <link rel="stylesheet" href="../css/services.css">
    <script src="../js/scripts.minf5b501.js"></script>
</head>
<body>
<section id="header">
    <div class="container">
        <ul class="top-nav">
            <li class="primary-action">
                <a href="../logout" class="btn">
                    注销
                </a>
            </li>
        </ul>
    </div>
</section>
<section>
    <nav id="nav" class="navbar navbar-default navbar-main" role="navigation">
        <div class="container">

            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#primary-nav">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
            </div>

            <div class="collapse navbar-collapse" id="primary-nav">
                <ul class="nav navbar-nav">
                    <li menuitemname="Home" class="" id="Primary_Navbar-Home">
                        <a href="../index.html">
                            主页
                        </a>
                    </li>

                    <li menuitemname="Services" class="dropdown" id="Primary_Navbar-Services">
                        <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                            服务
                            &nbsp;<b class="caret"></b> </a>
                        <ul class="dropdown-menu">
                            <li menuitemname="pm-addon-overview" id="Primary_Navbar-Services-pm-addon-overview">
                                <a href="./myvps.jsp">
                                    我的vps
                                </a>
                            </li>
                            <li menuitemname="My Services" id="Primary_Navbar-Services-My_Services">
                                <a href="./tickets.jsp">
                                    服务咨询
                                </a>
                            </li>
                            <li menuitemname="My Services">
                                <a href="./openticket.jsp">
                                    咨询客服
                                </a>
                            </li>

                        </ul>
                    </li>

                    <li menuitemname="Home" class="" id="Primary_Navbar-Home">
                        <a href="./ordervps.jsp">
                            购买VPS
                        </a>
                    </li>

                </ul>
            </div>
        </div>
    </nav>
</section>
<section id="main-body">

    <div class="container">
        <div class="row">
            <div class="col-md-3 pull-md-left sidebar">
                <div menuitemname="Client Details" class="panel panel-sidebar panel-sidebar">
                    <div class="panel-heading">
                        <h3 class="panel-title">
                            <i class="fas fa-user"></i>&nbsp; 我的信息
                            <i class="fas fa-chevron-up panel-minimise pull-right"></i>
                        </h3>
                    </div>

                    <div class="panel-body">
                        <strong><%=user.getUsername()%></strong><br>
                        <%=user.getEmail()%><br>
                        <%=user.getFamilyname()%> <%=user.getName()%><br>

                    </div>
                    <div class="panel-footer clearfix">

                    </div>
                </div>
            </div>
            <div class="col-md-9 pull-md-right main-content">

                <div class="header-lined">
                    <h1>咨询客服
                        <small>创建咨询记录</small>
                    </h1>
                    <ol class="breadcrumb">
                        <li>
                            <a href="/index.html"> 主页
                            </a></li>
                        <li>
                            <a href="#"> 服务
                            </a></li>
                        <li class="active">
                            咨询客服
                        </li>
                    </ol>
                </div>

                <form method="get" action="../createtk"
                      enctype="multipart/form-data" role="form" id="frmReply">
                    <input type="hidden" name="username" value="<%=username%>">
                    <div class="row">
                        <div class="form-group col-sm-4">
                            <label for="inputName">姓名</label>
                            <input class="form-control disabled" type="text" id="inputName" value="<%=user.getUsername()%>"
                                   disabled="disabled"></div>
                        <div class="form-group col-sm-5">
                            <label for="inputEmail">电子邮箱</label>
                            <input class="form-control disabled" type="text" id="inputEmail"
                                   value="<%=user.getEmail()%>" disabled="disabled"></div>
                    </div>
                    <div class="row">
                        <div class="form-group col-sm-10">
                            <label for="inputSubject">主题</label>
                            <input type="text" name="subject" id="inputSubject" value="" class="form-control">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="inputMessage">内容</label>
                        <div class="md-editor" id="1561561754079">
                                    <textarea name="message" id="inputMessage" rows="12"
                                              class="form-control markdown-editor md-input"
                                              data-auto-save-name="client_ticket_reply_739417"
                                              style="resize: vertical;"></textarea>
                            <div class="md-fullscreen-controls"><a href="#" class="exit-fullscreen"
                                                                   title="Exit fullscreen"><span
                                    class="glyphicon glyphicon-fullscreen"></span></a></div>
                        </div>
                    </div>
                    <div class="form-group text-center">
                        <input class="btn btn-primary" type="submit" name="save" value="提交">
                        <input class="btn btn-default" type="reset" value="取消"
                               onclick="jQuery('#ticketReply').click()">
                    </div>
                </form>
                <script>
                    jQuery(document).ready(function() {
                        getTicketSuggestions();
                    });
                </script>
            </div>
            <div class="clearfix"></div>
        </div>
    </div>
</section>
</body>
</html>
